void Clear(void)				
{
	SendCommand(1<<0);
}

//LCD cursor home
void Home(void)			
{
	SendCommand(1<<1);
}


//Outputs string to LCD
void PrintString(char* data, uint8_t nBytes)	{

	register uint8_t i;

	// check to make sure we have a good pointer
	if (!data) return;

	// print data
	for(i=0; i<nBytes; i++)
	{
		SendChar(data[i]);
	}
}

//Cursor to X Y position
void GotoXY(uint8_t x, uint8_t y){

	register uint8_t DDRAMAddr;
	// remap lines into proper order
	switch(y)
	{
	case 0: DDRAMAddr = LCD_LINE0_DDRAMADDR+x; break;
	case 1: DDRAMAddr = LCD_LINE1_DDRAMADDR+x; break;
	default: DDRAMAddr = LCD_LINE0_DDRAMADDR+x;
	}

	// Set data address
	SendCommand(1<<LCD_DDRAM | DDRAMAddr);
	
}

